<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core" xml:lang="en" lang="en">
	<head>
		<title>My Facelets Page</title>
		<meta http-equiv="keywords" content="enter,your,keywords,here" />
		<meta http-equiv="description"
			content="A short description of this page." />
		<meta http-equiv="content-type" content="text/html; charset=UTF-8" />

		<!--<link rel="stylesheet" type="text/css" href="styles.css">-->
		<script type="text/JavaScript">

		   function showhidediv(id){  
			   var sbtitle=document.getElementById(id);  
			   if(sbtitle){  
			      if(sbtitle.style.display=='block'){  
			      sbtitle.style.display='none';  
			      }else{  
			      sbtitle.style.display='block';  
			      }  
			   }  
			 }  
		   function toggle(){
		   showhidediv("searchDiv");
		   }
   </script>
	</head>
	<body>
		<p>
			<ui:insert name="body"><h1 align="center">jsf基础标签学习</h1>
		
				<h:form>
				
					<h:commandLink value="登陆" action="#{test.link}">
						<f:param value="爱心" name="love"></f:param>
					</h:commandLink>  &nbps;&nbps;&nbps;&nbps;&nbps;&nbps;&nbps;&nbps;
					
					<a href="#" onclick="toggle();">隐藏或显示 js</a><br/> 
					
						
					<h:commandLink action="#" 	onclick="toggle();">
					</h:commandLink>
				
				</h:form>
				
				
				
				<br/>
				<br/>
					<h:form>
		<div id="searchDiv" style="#{test.style}">
					label : <h:outputLabel value="输出label"></h:outputLabel><br/>
					link : <h:outputLink value="http://www.163.com" >
						<f:param value="163" name="wangyi"></f:param>
						<h:outputText value="网易"></h:outputText>
					</h:outputLink> <br/>
			
					format : <h:outputFormat value="{0} Love {1}">
								<f:param value="I"></f:param>
								<f:param value="You"></f:param>
							</h:outputFormat><br/>
						<h:outputText value="test"></h:outputText> <br/>
						<h:outputText value="#{test.test}"></h:outputText> <br/>
						
						输入框： <h:inputText value="#{test.test}"></h:inputText><br/>
						文本框:<h:inputTextarea value="#{test.test}" cols="50" rows="10"></h:inputTextarea> <br/>
						密码:<h:inputSecret value="#{test.test}"></h:inputSecret> <br/>
						隐藏域:<h:inputHidden value="#{test.test}"></h:inputHidden> <br/>
						<h:commandButton value="clear" action="#{test.test}"></h:commandButton>&nbps;&nbps;&nbps;&nbps;&nbps;&nbps;&nbps;&nbps;
						<h:commandButton value="search" action="#{test.test}"></h:commandButton><br/>
		</div>
	</h:form>
			</ui:insert>
		
		
	
		</p>
		
	
	</body>
</html>
